package com.framework.spring.lookup;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
@Slf4j(topic = "e")
public class LC implements ApplicationContextAware {

	private ApplicationContext applicationContext;

	public LC() {
		log.info("construct lc");
	}

	public void printInfo() {
		log.info("lb-[{}]", applicationContext.getBean(LB.class));
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		this.applicationContext = applicationContext;
	}
}
